/*
 * @Author: yjp
 * @Date: 2022-03-25 09:54:30
 */

import { ProFormText } from "@ant-design/pro-form";

export const InfoForm = (props: { isCreate: boolean }) => {
    const { isCreate } = props;

    return (
        <>
            <ProFormText
                hidden={!isCreate}
                name='username'
                label='账号'
                rules={[
                    { required: true, message: '请填写账号' },
                ]}
            />
            <ProFormText
                name='firstName'
                label='姓'
                rules={[
                    { required: true, message: '请填写姓' },
                ]}
            />
            <ProFormText
                name='lastName'
                label='名'
                rules={[
                    { required: true, message: '请填写名' },
                ]}
            />
            <ProFormText
                name='email'
                label='邮箱'
                rules={[
                    { required: true, message: '请填写邮箱' },
                    { type: 'email', message: '请输入正确的邮箱' }
                ]}
            />
        </>
    );
};